// 变量声明和基本操作
const x = 10;
const y = 20;
const sum = x + y;

// 字符串操作
const greet = "Hello";
const name = "JavaScript";
const greeting = greet + ", " + name + "!";

// 递归函数
const factorial = function(n) {
  if (n <= 1) {
    return 1;
  }
  return n * factorial(n - 1);
};

// 计算阶乘
const fact5 = factorial(5);
const fact5Str = "" + fact5;  // 转换为字符串

// 计算最终消息
const message = (function() {
  if (sum > 25) {
    return "和大于25";
  } else {
    return "和不大于25";
  }
})();

// 组合消息
greeting + " | " + message + " | 5的阶乘是: " + fact5Str; 